<template>
  <div class="app-container ">
    <el-form ref="form" size="mini" :model="form" :rules="rules" label-width="180px">
      <el-form-item>
        <el-button size="mini" :loading="loading" type="primary" @click="submit">系统升级</el-button>
      </el-form-item>
    </el-form>

  </div>
</template>
<script>
export default {
  name: 'sitesetupupgrade',
  components: {},
  data() {
    return {
      form: {
      },
      loading: false,
      activeName: '基本信息',
      rules: {
      }
    }
  },
  mounted() {
  },
  methods: {
   submit() {
     this.$refs['form'].validate(valid => {
       if (valid) {
         this.loading = true
         this.$api.post('/Upgrade/index').then(res => {
           this.$message({
             message: '升级成功',
             type: 'success'
           })
           this.loading = false
         }).catch(() => {
           this.loading = false
         })
       }
     })
   }
  }
}
</script>
